<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #father{
            border: 1px solid red;
            overflow: hidden;
        }
        #son1,#son2,#son3{
            width: 200px;
            height: 200px;
            float: left;
        }
        #son1{
            background-color: black;
        }
        #son2{
            background-color: rebeccapurple;
        }
        #son3{
            background-color: blanchedalmond;
        }
        /* p{
            clear: both;
        } */
    </style>
</head>
<body>
    <div id="father">
        <div id="son1"></div>
        <div id="son2"></div>
        <div id="son3"></div>
        <!-- <p></p> -->
        <!-- 使用空标签清除浮动的影响 -->
    </div>
</body>
</html>